Current Location: Home> Function Categories> dechex

dechex

Convert decimal to hexadecimal
Name:dechex
Category:math
Programming Language:php
One-line Description:Convert decimal to hexadecimal.

Definition and usage

dechex() function converts decimal to hexadecimal.

Example

 <?php
echo dechex ( "30" ) ;
echo dechex ( "10" ) ;
echo dechex ( "1587" ) ;
echo dechex ( "70" ) ;
?>

Try it yourself

grammar

 dechex ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing the hexadecimal representation of the given binary_string parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is "ffffffff".

Similar Functions
  • Convert octal to decimal octdec

    octdec

    Convertoctaltodecima
  • Generate better random numbers mt_rand

    mt_rand

    Generatebetterrandom
  • Antihyperbolic tangent atanh

    atanh

    Antihyperbolictangen
  • Square root sqrt

    sqrt

    Squareroot
  • Further method to sort ceil

    ceil

    Furthermethodtosort
  • Generate a random integer rand

    rand

    Generatearandominteg
  • Convert radians to corresponding angles rad2deg

    rad2deg

    Convertradianstocorr
  • Round floating point numbers round

    round

    Roundfloatingpointnu
Popular Articles